﻿using System.Collections.Generic;
using System.Runtime.Serialization;
using OctoOS;

/// <summary>
/// Summary description for PageMeta
/// </summary>

[DataContract]
public class PageMeta
{
	[DataMember(Order = 1)]
	public CompleteStatus Status { get; internal set; }

    [DataMember(Order = 2)]
    public short SortOrder { get; internal set; }

	private PageMeta()
	{
	}

	public PageMeta(CompleteStatus status, short sortOrder)
	{
		Status = status;
        SortOrder = sortOrder;
	}

	public byte[] ToArray()
	{
		return ConvertUtility.ToProtoBuf<PageMeta>(this);
	}

	public static PageMeta Create(byte[] data)
	{
		return ConvertUtility.FromProtoBuf<PageMeta>(data);
	}
}